<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            width: 300px;
            height: 200px;
            padding: 10px;
            border: 10px dashed red;
            background: url('./test.png');
            color: #fff;
            background-origin: border-box;
            /*背景图片从什么区域显示 默认是padding-box从内边距开始*/
            /* background-origin: padding-box; 从内边距开始 */
            /* background-origin: content-box; 从内容距开始*/
            background-clip: border-box;
            /*设置背景在什么区域显示 */
            background-size: cover;
            /* cover和contain cover铺满但不确定背景图显示完全,contain等比缩放*/

            box-shadow: 30px 30px 50px green /*横向,纵向,模糊度 颜色 inset(内部)*/
        }
    </style>
</head>

<body>
    <div class="box">
        haha 
    </div>
</body>

</html>